/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package TimeRecording.business.calcs;

/**
 *
 * @author david
 */
public class PatternAllocation {

    private double expected;
    private double worked;
    private double holiday;
    private double sickness;

    //==========================================================================

    public double getExpected() {
        return expected;
    }

    public void setExpected(double expected) {
        this.expected = expected;
    }

    public void adjustExpected(double expected) {
        this.expected += expected;
    }

    public double getWorked() {
        return worked;
    }

    public void setWorked(double worked) {
        this.worked = worked;
    }

    public void adjustWorked(double worked) {
        this.worked += worked;
    }

    public double getHoliday() {
        return holiday;
    }

    public void setHoliday(double holiday) {
        this.holiday = holiday;
    }

    public void adjustHoliday(double holiday) {
        this.holiday += holiday;
    }

    public double getSickness() {
        return sickness;
    }

    public void setSickness(double sickness) {
        this.sickness = sickness;
    }

    public void adjustSickness(double sickness) {
        this.sickness = sickness;
    }

    //==========================================================================

    public double getPaid() {
        return worked + holiday;
    }

    public double getPaidShortfall() {        
        return expected - getPaid();
    }

    public double getTotalShortfall() {
        return getPaidShortfall() - sickness;
    }

    //==========================================================================

    @Override
    public String toString() {
        return "expected=" + expected + ", " +
                "worked=" + worked + ", " +
                "holiday=" + holiday + ", " +
                "sickness=" + sickness;
    }
}